package xyx.springboot.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table
@ApiModel(value="用户信息")
public class User {
    @ApiModelProperty("用户id")
    @Id
    int id;
    @ApiModelProperty("用户账号")
    String username;
    @ApiModelProperty("用户密码")
    String password;
    @ApiModelProperty("用户姓名")
    String realname;
    @ApiModelProperty("用户电话")
    String phonumber;
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getPhonumber() {
        return phonumber;
    }

    public void setPhonumber(String phonumber) {
        this.phonumber = phonumber;
    }

    @Override
    public String toString(){
        return "id=" + id + ",username=" + username + ",password=" + password + ",realname=" + realname + ",phonumber=" + phonumber;
    }
}

